﻿using LJ.Abstractions.Pack;
using LJ.StreamSystem.LazyHare.Transport.Abstractions.Pack;
using LJ.StreamSystem.LazyHare.Transport.Kafka.Internal;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJ.StreamSystem.LazyHare.Transport.Kafka.Pack;

public abstract class StreamSystemLazyHareTransportKafkaPack : PackBase, IStreamSystemLazyHareTransportPack
{
    public override void Add(IPackContext packContext)
    {
        packContext.ConfigManager.Add<StreamSystemTransportConfig>("StreamSystem:Transport");

        packContext.DependencyManager.ServiceCollection.AddTransient<IStreamSystemClient, KafkaStreamSystemClient>();
        packContext.DependencyManager.ServiceCollection.AddSingleton<IStreamSystemClientFactory, KafkaStreamSystemClientFactory>();
    }

    public override void Use(IPackProvider packProvider)
    {
    }
}
